<?php
include('./adm_header.php');
?>
			<div id="content">
				<?php
				if (isset($_GET['page']))
				{
					if (empty($_GET['page']))
					{
						echo 'There is no page specified to delete, please return <a href="./index.php">home</a>.';
					}
					else
					{
						if (!file_exists('../pages/' . $_GET['page']))
						{
							if (!file_exists('../pages/subpages/' . $_GET['page']))
							{
								echo 'The page specified does not exist, please return <a href="./index.php">home</a>.';
							}
							else
							{
								unlink('../pages/subpages/' . $_GET['page']);
								?>
				<meta http-equiv="refresh" content="0;url=./index.php" />
								<?php
							}
						}
						else
						{
							unlink('../pages/' . $_GET['page']);
							?>
				<meta http-equiv="refresh" content="0;url=./index.php" />
							<?php
						}
					}
				}
				else
				{
					echo 'There is no page specified to delete, please return <a href="./index.php">home</a>.';
				}
				?>
			</div>
		</div>
	</body>
</html>